package edu.hunau.cxb17.dao;
import edu.hunau.cxb17.pojo.User;

import java.util.List;
/**
 * @Author: york
 * @Description: 定义操作t_user表的规则
 * @Date: 2019-03-26 10:39
 **/
public interface IUserDao {
    public void update(User u);

    /**
     * @Author: york
     * @Description: 批量插入数据
     * @Date: 2019-03-26 11:30
     * @Param [users]
     * @return void
     **/
    public void saveBatch(List<User> users);

    public void delete(User u);

    public void save(User u);

    /**
     * @Author: york
     * @Description:  进行分页查询  select * from t_user limit 0,4;
     * @Date: 2019-03-26 11:28
     * @Param [begin 起始位置, size 查询的数量]
     * @return java.util.List<edu.hunau.cxb17.pojo.User>
     **/
    public List<User> queryByPage(int begin,int size);

    public Integer saveReturnPk(User u);

    public List<User> queryAllUsers();

    public User queryById(Integer id);

    /**
     * @Author: york
     * @Description:  根据用户名进行模糊查询
     * @Date: 2019-03-26 11:31
     * @Param [datas]
     * @return java.util.List<edu.hunau.cxb17.pojo.User>
     **/
    public List<User> queryByLikeName(String datas);
}
